#ifndef DYNAMICLINKER_H
#define DYNAMICLINKER_H

#include <Globals.h>
#include <ElfParser.h>

/**
  Supervises the dynamic loading of libraries and binding of symbols.
**/
class DynamicLinker
{
public:
  DynamicLinker(Elf32Parser *elf);

  ~DynamicLinker();
  
  /**
    Causes a symbol to be resolved. Called from the global function 
    resolveSymbol().
  **/
  Address resolveSymbol(Address library, Address symbol);
  
private:
  /**
    The ELF parser object representing the main executable.
  **/
  Elf32Parser *mainExecutable;
};

#endif
